From be0964d9e1d110ff647d3d6433835786b88f9435 Mon Sep 17 00:00:00 2001 From: Lauri Vuorela Date: Mon, 5 Feb 2024 02:16:30 +0100 Subject: format currency with thousand separators (#81) --- src/app/groups/[groupId]/balances-list.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/app/groups/[groupId]/balances-list.tsx') diff --git a/src/app/groups/[groupId]/balances-list.tsx b/src/app/groups/[groupId]/balances-list.tsx index 5e7b81b..b795914 100644 --- a/src/app/groups/[groupId]/balances-list.tsx +++ b/src/app/groups/[groupId]/balances-list.tsx @@ -1,5 +1,5 @@ import { Balances } from '@/lib/balances' -import { cn } from '@/lib/utils' +import { cn, formatCurrency } from '@/lib/utils' import { Participant } from '@prisma/client' type Props = { @@ -28,7 +28,7 @@ export function BalancesList({ balances, participants, currency }: Props) {
- {currency} {(balance / 100).toFixed(2)} + {formatCurrency(currency, balance)}
{balance !== 0 && (